package com.zhaoxi.project.md.controller;

import com.zhaoxi.framework.web.controller.BaseController;
import com.zhaoxi.framework.web.page.TableDataInfo;
import com.zhaoxi.project.md.domain.AnyEntity;
import com.zhaoxi.project.md.service.impl.MdReportServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 测试Controller
 *
 * @author zhaoxi
 * @date 2023-07-20
 */
@RestController
@RequestMapping("/crm/report")
public class MdReportController extends BaseController {
    @Autowired
    private MdReportServiceImpl mdReportService;

    /**
     * 查询测试列表
     */
    @PreAuthorize("@ss.hasPermi('crm:report:list')")
    @GetMapping("/list")
    public TableDataInfo list(AnyEntity anyEntity) {
        startPage();
        List<AnyEntity> list = mdReportService.getReportList(anyEntity);
        return getDataTable(list);
    }

}
